<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<title>退款详情</title>
	<% include  ../template/commonCss.ejs %>
	<link href="<%=resUrl%>/css/order/refundDetail.css" rel="stylesheet" type="text/css" />
	<% include ../template/commonJs.ejs %>
</head>

	<script>
		var myOrderId= '<%-orderId%>';
		var isSeller= '<%-isSeller%>';
	</script>
<body ontouchstart>
	<% var topTitle = '退款详情' ;var topReturnType = ''%>
	<% include ../template/topReturn.ejs %>
	<div id="contentTo" <%if(locals.token && token != ''){%>style="top:0;"<%}%>></div>
	<script id="content" type="text/html">	
	
	<div class="shoplist-item">
		
		<div class="shoplist-item-body">
			
			<div class="order-top" >
				<%if(isSeller && isSeller == 'true'){%>
					买家申请退款，请及时处理
				<%}else{%>
					申请已提交，请等待卖家处理
				<%}%>
			</div>
				
			<div class="order-bottom-item" >
				<div class="order-left" >退款金额</div>
				<div class="order-rig" >￥{{refundDetail.money || 0}}</div>
			</div>
			<div class="order-bottom-item" >
					<div class="order-left" >退款类型</div>
					<div class="order-rig" >
						{{if refundDetail.type == 1}}
						仅退款
						{{else if refundDetail.type == 2}}
						退款退货
						{{/if}}
						<span style="color:#666666">(最高可退{{payMoney||0}}元)</span>
					</div>
			</div>
			<div class="order-bottom-item" >
					<div class="order-left" >退款原因</div>
					<div class="order-rig" >{{refundDetail.reason}}</div>
			</div>
			{{if refundDetail.applyDate}}
			<div class="order-bottom-item" >
					<div class="order-left" >申请时间</div>
					<div class="order-rig" >{{refundDetail.applyDate | TimestampToTime}}</div>
			</div>
			{{/if}}
			<%if(isSeller && isSeller == 'true'){%>
				<div class="order-bottom" >
					<div class="order-bots order-bots-orange" onclick="opRefund('{{id}}',1);">确认退款</div>
					<div class="order-bots order-bots-orange" onclick="opRefund('{{id}}',2);">拒绝退款</div>
				</div>
				
			<%}else{%>
				<div class="order-bottom" >
					<a href="javascript:visitUrl('/order/applyRefund?id={{id}}',true)">
						<div class="order-bots" >修改退款申请</div>
					</a>
					<div class="order-bots" onclick="cancelRefund('{{id}}');" >取消退款</div>
				</div>
			<%}%>
			
			
			
		</div>
	</div>
	
	
	<script id="contentLogistics" type="text/html">
		<div style="text-align:center;margin-bottom:0.5rem">单号{{LogisticCode}}</div>
		{{each Traces}}	
		<div class="odetail-express">
			<div class="odetail-express-logo"></div>
			<div class="odetail-express-rig">
				
				<div class="odetail-express-desc">{{$value.AcceptStation}}</div>
				<div class="oderail-express-time">{{$value.AcceptTime}}</div>
			</div>
			<div class="auto-height"></div>
		</div>
		{{/each}}
	</script>
	<script type="text/javascript" src="<%=resUrl%>/lib/md5.js"></script>	
	<script type="text/javascript" src="<%=resUrl%>/js/order/refundDetail.js"></script>
</body>

</html>